package com.cc.library.service.impl;

import com.cc.library.dao.CollectionDao;
import com.cc.library.domain.Collection;
import com.cc.library.domain.PageBean;
import com.cc.library.service.CollectionService;

public class CollectionServiceImpl implements CollectionService {
	private CollectionDao collectionDao;
	
	public void setCollectionDao(CollectionDao collectionDao) {
		this.collectionDao = collectionDao;
	}

	@Override
	public PageBean<Collection> getCollectionsByReader(Collection collection, int p, int size) {
		// TODO Auto-generated method stub
		return collectionDao.getCollectionsByReader(collection, p, size);
	}

	@Override
	public PageBean<Collection> getCollectionsByBook(Collection collection, int p, int size) {
		// TODO Auto-generated method stub
		return collectionDao.getCollectionsByBook(collection, p, size);
	}

	@Override
	public Integer addCollection(Collection collection) {
		// TODO Auto-generated method stub
		return collectionDao.addCollection(collection);
	}

	@Override
	public boolean deleteCollection(Collection collection) {
		// TODO Auto-generated method stub
		return collectionDao.deleteCollection(collection);
	}

	@Override
	public Collection findCollectionById(int collectionId) {
		// TODO Auto-generated method stub
		return collectionDao.findCollectionById(collectionId);
	}

	@Override
	public Collection findCollectionByBookAndReader(Collection collection) {
		// TODO Auto-generated method stub
		return collectionDao.findCollectionByBookAndReader(collection);
	}

}
